import * as ajaxRequest from "../ajaxRequest";

import environment from "@/environment/index";

/**
 * 获取属性数据管理
 * @param {*} option 
 */
// 列表请求
export const getList = options => {
    return ajaxRequest.get(`${environment.loginApi}/api/v1/User/getlist`, options);
};
// 详情请求
export const getDetail = options => {
    return ajaxRequest.get(`${environment.loginApi}/api/v1/User/GetById/${options}`);
};
// 新增请求
export const postCreate = options => {
    return ajaxRequest.post(`${environment.loginApi}/api/v1/User/Create`, options);
};
//编辑请求
export const putEdit = options => {
    return ajaxRequest.put(`${environment.loginApi}/api/v1/User/Edit`, options);
};
// 下架
export const putOfflone = options => {
    return ajaxRequest.put(`${environment.loginApi}/api/v1/User/disable/${options}`);
};
// 上架
export const putOnline = options => {
    return ajaxRequest.put(`${environment.loginApi}/api/v1/User/enable/${options}`);
};

// 重置密码
export const putReset = options => {
    return ajaxRequest.put(`${environment.loginApi}/api/v1/user/ResetPassword`, options);
};

// 渠道列表
export const getChannelList = options => {
    return ajaxRequest.get(`${environment.productApi}/api/v1/Channel/getlist`, options);
};